#ifndef FILTER_H
#define FILTER_H

#include "stm32f4xx.h"
#include "mpu6050.h"


float Low_Filter(float value);
void SortAver_Filter(float value,float *filter,uint8_t N);
void  SortAver_Filter1(float value,float *filter,uint8_t n);
void  SortAver_FilterXYZ(INT16_XYZ *acc,FLOAT_XYZ *Acc_filt,uint8_t N);
void Aver_FilterXYZ6(INT16_XYZ *acc,INT16_XYZ *gry,FLOAT_XYZ *Acc_filt,FLOAT_XYZ *Gry_filt,uint8_t N);
void Aver_FilterXYZ(INT16_XYZ *acc,FLOAT_XYZ *Acc_filt,uint8_t N);
void Aver_Filter(float data,float *filt_data,uint8_t n);
void INTSortAver_Filter(uint16_t value,uint16_t *filter,uint8_t n);
void QSortAver_Filter(float value,float *filter,uint8_t n);
void ASortAver_Filter(float value,float *filter,uint8_t n);




void RC_Filter_(float kout_coe,float in,float *out);
void RC_OneFilter_(float kout_coe,float in,float *out);

void RC_CI(float angle_m, float gyro_m,float *angle_R,float coe,float dt); 


void Gyro_MagCom(float angle_m, float gyro_m,float *angle_R,float dt);
void Com_Gry(float angle_m, float gyro_m,float *angle_R);
void Com_LF(float angle_m, float gyro_m,float *angle_R,float dt);



#endif
